package cc.openkit.admin.service.userInfo.impl;

import cc.openkit.admin.dao.UserInfoMapper;
import cc.openkit.admin.model.UserInfo;
import cc.openkit.admin.service.common.impl.BaseServiceImpl;
import cc.openkit.admin.service.userInfo.UserInfoService;
import com.github.pagehelper.PageHelper;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class UserInfoServiceImpl extends BaseServiceImpl<UserInfo> implements UserInfoService {
    private Logger log = Logger.getLogger(UserInfoServiceImpl.class);

    @Resource
    private UserInfoMapper userInfoMapper;

    public List<UserInfo> findByCondition(UserInfo userInfo, Integer integer, Integer integer1) {
        PageHelper.startPage(integer, integer1);
        return userInfoMapper.findByCondition(userInfo);
    }

    public int queryCountByCondition(UserInfo userInfo) {
        return userInfoMapper.queryCountByCondition(userInfo);
    }
}
